<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- 引入样式 -->
    <link
      rel="stylesheet"
      href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"
    />
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  </head>
  <body>
    <div id="app">
      <my-app>
        <template v-slot="scope">
          <div>{{scope.row}}</div>
        </template>
      </my-app>
    </div>
  </body>
  <script>
    let myApp = Vue.component("myapp", {
      data() {
        return {
          user: {
            firstName: "z",
            lastName: "s",
          },
        };
      },
      template: `
        <div>11
        <slot :row='user'></slot>
        </div>
      `,
    });
    new Vue({
      el: "#app",
      data: {
        msg: "111",
      },
      components: {
        myApp,
      },
    });
  </script>
</html>
